home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Internet
/
Collection of Internet.iso
/
infosrvr
/
doc
/
www_talk.arc
/
000015_emv@heifetz.msen.com _Wed Nov 20 10:30:27 1991.msg
< prev
next >
Wrap
Internet Message Format
|
1992-11-30
|
2KB
Return-Path: <emv@heifetz.msen.com>
Received: from cernvax.cern.ch by nxoc01.cern.ch (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)
id AA08265; Wed, 20 Nov 91 10:30:27 GMT+0100
Received: by cernvax.cern.ch (5.57/Ultrix2.0-B)
id AA11177; Wed, 20 Nov 91 10:26:56 +0100
Received: by dxmint.cern.ch (cernvax) (5.57/3.14)
id AA01645; Wed, 20 Nov 91 10:21:09 +0100
Received: by heifetz.msen.com (/\==/\ Smail3.1.22.1 #22.11)
id <m0kjoAF-000HftC@heifetz.msen.com>; Wed, 20 Nov 91 04:24 EST
Message-Id: <m0kjoAF-000HftC@heifetz.msen.com>
To: www-talk@nxoc01.cern.ch
Cc: archie-maint@cc.mcgill.ca, prospero@isi.edu
Subject: prototype of www-prospero-archie interface
Date: Wed, 20 Nov 91 04:24:09 -0500
From: Edward Vielmetti <emv@msen.com>
What I say prototype, I mean just a little teeny tiny idea
turned into a few lines of code.
This is a piece of perl that is a gateway between archie and
WWW. It should be set up to run as a server under inetd. It
takes incoming requests of the form
GET /nic.funet.fi/exact?wais
and returns HTML formatted archie results back. It depends on the
C language Prospero archie client that you can get from (e.g.)
ftp.cs.widener.edu.
My HTML is really bad but you get the idea, it should look somehow
somewhat reasonable and something you can click on.
With a little bit of work any dbm file looks like it can be turned
into a WWW queryable server along the same lines.
Take note that you are inviting truly perverse packet transport,
with a query from one site resutling in hundreds of packets being
shuttled all around the world ....
--Ed
#!/usr/local/bin/perl
# gateway from www to archie
# this is the "brute force" kind of approach; a tidier solution
# would speak the prospero protocols directly.
while (<>) {
if (m,^GET /(.*)/(.*)\?(.*)$,) {
$archie = $1;
$type = $2;
$query = $3;
} else {
exit 0; # XXX
}
# print "$node $database $query \n";
if ($type eq 'exact') {
$arg = " -e ";
} else {
$arg = " -s ";
}
$archcmd = "archie -l -t " . $arg . " -h " . $archie . " " . $query ;
print "<title>archie $type search for $query on $archie </title>\n";
@result = `$archcmd`;
foreach (@result) {
($time, $size, $host, $file) = split;
print "<a href=file://anonymous@$host:$file>\n";
print "$_</a>\n";
}
}